/*
 * Copyright (c) 2020.
 * http://www.ulabcare.com
 */

package com.mt.roll.common.params;

import com.mt.roll.core.base.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * 下载文件对象入参
 *
 * @author jiff
 * @date 2021/01/12
 * @since 1.0
 **/
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data
@ApiModel(value = "下载文件信息对象", description = "下载文件信息对象")
public class DownloadFileParam extends BaseParam {

    @ApiModelProperty(value = "附件ID", example = "1")
    @NotNull(message = "附件ID不能为空")
    private Long attachmentId;

    @ApiModelProperty(value = "下载方式: 0、预览，1、下载", example = "0")
    @NotNull(message = "下载方式不能为空")
    private String type;

    @ApiModelProperty(value = "下载文件自定义文件名", example = "报销发票")
    private String fileName;

    @ApiModelProperty(value = "压缩尺寸，取值范围（0.00--1.00），图片文件有效", example = "1")
    private float scale = 1f;

    @ApiModelProperty(value = "压缩质量，取值范围（0.00--1.00），图片文件有效", example = "1")
    private float outputQuality = 1f;
}
